import request from '@/utils/request'

// export function getList(params) {
//   return request({
//     url: '/table/list',
//     method: 'get',
//     params
//   })
// }
export default {
  // 教师列表（条件查询分页）
  getTeacherListPage(current, limit, teacherQuery) {
    return request({
      // url: '/table/list',
      // url 的符号为 `` 可以拼接 ${}
      url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
      // params
      // data 则会把对象转换成 json 传递到后台接口
      data: teacherQuery
    })
  },

  // 删除教师
  removeTeacherById(id) {
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete',
    })
  },

  // 添加教师
  addTeacher(teacher) {
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: teacher
    })
  },

  // 查询教师
  findTeacherById(id) {
    return request({
      url: `/eduservice/teacher/findTeacher/${id}`,
      method: 'get',
    })
  },

  // 更新教师
  updateTeacher(teacher) {
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: teacher
    })
  },
  
  

}
